wayland: Fix memory leak in server decoration object
authorDavid Edmundson <kde@davidedmundson.co.uk>
Thu, 28 Jun 2018 10:13:33 +0000 (11:13 +0100)
committerDavid Edmundson <kde@davidedmundson.co.uk>
Thu, 28 Jun 2018 17:51:12 +0000 (18:51 +0100)
The server decoration object becomes invaid when the wl_surface is
deleted. We should tidy it up then.

gdk/wayland/gdkwindow-wayland.c

index eba0f37f972d3aadb59c6f737c13d32b99885b57..9ae45231ae661c70848887168a6c8e058c5f1199 100644 (file)
@@ -3108,6 +3108,12 @@ gdk_wayland_window_hide_surface (GdkWindow *window)
           impl->application.was_set = FALSE;
         }
 
+      if (impl->display_server.server_decoration)
+        {
+          org_kde_kwin_server_decoration_release (impl->display_server.server_decoration);
+          impl->display_server.server_decoration = NULL;
+        }
+
       wl_surface_destroy (impl->display_server.wl_surface);
       impl->display_server.wl_surface = NULL;